package com.sxit.tdf.server.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 根据用户名和密码传入登陆的表单
 *
 * @author 橙子高
 * @date 2022/2/5 20:08
 * @describe
 */
@Data
@Schema(description = "根据用户名和密码传入登陆的表单")
public class LoginByUserNameAndPasswordFrom {

  @Schema(description = "密码")
  @NotBlank(message = "账户名不能为空")
  @Pattern(regexp = "^[a-zA-Z0-9]{5,20}$", message = "请填写5至20位的数字与字母组合的密码")
  private String password;

  @NotBlank(message = "密码不能为空")
  @Schema(description = "账户")
  @Pattern(regexp = "^[a-zA-Z0-9]{5,20}$", message = "请填写5至20位的数字与字母组合的用户名")
  private String username;

  private boolean autoLogin;
  private String type;
}
